using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._SpaceTimePatternMiningTools._SpaceTimeCubeCreation
{
    /// <summary>
    /// <para>Create Space Time Cube From Multidimensional Raster Layer</para>
    /// <para>Creates a space-time cube from a  multidimensional raster layer and structures the data into space-time bins for efficient space-time analysis and visualization.</para>
    /// <para>从多维栅格图层创建时空立方体，并将数据结构化为时空条柱，以实现高效的时空分析和可视化。</para>
    /// </summary>    
    [DisplayName("Create Space Time Cube From Multidimensional Raster Layer")]
    public class CreateSpaceTimeCubeMDRasterLayer : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CreateSpaceTimeCubeMDRasterLayer()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_md_raster">
        /// <para>Input Multidimensional Raster Layer</para>
        /// <para>The input multidimensional raster layer that will be converted into a space-time cube.</para>
        /// <para>将转换为时空立方体的输入多维栅格图层。</para>
        /// </param>
        /// <param name="_output_cube">
        /// <para>Output Space Time Cube</para>
        /// <para>The output netCDF data cube that will be created.</para>
        /// <para>将创建的输出 netCDF 数据多维数据集。</para>
        /// </param>
        public CreateSpaceTimeCubeMDRasterLayer(object _in_md_raster, object _output_cube)
        {
            this._in_md_raster = _in_md_raster;
            this._output_cube = _output_cube;
        }
        public override string ToolboxName => "Space Time Pattern Mining Tools";

        public override string ToolName => "Create Space Time Cube From Multidimensional Raster Layer";

        public override string CallName => "stpm.CreateSpaceTimeCubeMDRasterLayer";

        public override List<string> AcceptEnvironments => ["extent", "outputCoordinateSystem", "parallelProcessingFactor"];

        public override object[] ParameterInfo => [_in_md_raster, _output_cube, _fill_empty_bins.GetGPValue()];

        /// <summary>
        /// <para>Input Multidimensional Raster Layer</para>
        /// <para>The input multidimensional raster layer that will be converted into a space-time cube.</para>
        /// <para>将转换为时空立方体的输入多维栅格图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Multidimensional Raster Layer")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_md_raster { get; set; }


        /// <summary>
        /// <para>Output Space Time Cube</para>
        /// <para>The output netCDF data cube that will be created.</para>
        /// <para>将创建的输出 netCDF 数据多维数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Space Time Cube")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _output_cube { get; set; }


        /// <summary>
        /// <para>Fill Empty Bins Method</para>
        /// <para><xdoc>
        ///   <para>Specifies how missing values in the output space-time cube will be filled. Each space-time bin in the output must have a value, so you must choose how to fill in values for raster cells with NoData values.</para>
        ///   <bulletList>
        ///     <bullet_item>Zeros—Empty bins with be filled with zeros. This is the default.</bullet_item><para/>
        ///     <bullet_item>Spatial neighbors—Empty bins will be filled with the average value of spatial neighbors.</bullet_item><para/>
        ///     <bullet_item>Space-time neighbors—Empty bins will be filled with the average value of space-time neighbors.</bullet_item><para/>
        ///     <bullet_item>Temporal trend—Empty bins will be filled using an interpolated univariate spline algorithm.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何填充输出时空多维数据集中的缺失值。输出中的每个时空图格都必须有一个值，因此必须选择如何使用 NoData 值填充栅格像元的值。</para>
        ///   <bulletList>
        ///     <bullet_item>零 - 用零填充的空箱。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>空间邻域 - 空箱将填充空间邻域的平均值。</bullet_item><para/>
        ///     <bullet_item>时空邻居—空箱将填充时空邻居的平均值。</bullet_item><para/>
        ///     <bullet_item>时间趋势—将使用插值单变量样条算法填充空图格。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Fill Empty Bins Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _fill_empty_bins_value _fill_empty_bins { get; set; } = _fill_empty_bins_value._ZEROS;

        public enum _fill_empty_bins_value
        {
            /// <summary>
            /// <para>Zeros</para>
            /// <para>Zeros—Empty bins with be filled with zeros. This is the default.</para>
            /// <para>零 - 用零填充的空箱。这是默认设置。</para>
            /// </summary>
            [Description("Zeros")]
            [GPEnumValue("ZEROS")]
            _ZEROS,

            /// <summary>
            /// <para>Spatial neighbors</para>
            /// <para>Spatial neighbors—Empty bins will be filled with the average value of spatial neighbors.</para>
            /// <para>空间邻域 - 空箱将填充空间邻域的平均值。</para>
            /// </summary>
            [Description("Spatial neighbors")]
            [GPEnumValue("SPATIAL_NEIGHBORS")]
            _SPATIAL_NEIGHBORS,

            /// <summary>
            /// <para>Space-time neighbors</para>
            /// <para>Space-time neighbors—Empty bins will be filled with the average value of space-time neighbors.</para>
            /// <para>时空邻居—空箱将填充时空邻居的平均值。</para>
            /// </summary>
            [Description("Space-time neighbors")]
            [GPEnumValue("SPACE_TIME_NEIGHBORS")]
            _SPACE_TIME_NEIGHBORS,

            /// <summary>
            /// <para>Temporal trend</para>
            /// <para>Temporal trend—Empty bins will be filled using an interpolated univariate spline algorithm.</para>
            /// <para>时间趋势—将使用插值单变量样条算法填充空图格。</para>
            /// </summary>
            [Description("Temporal trend")]
            [GPEnumValue("TEMPORAL_TREND")]
            _TEMPORAL_TREND,

        }

        public CreateSpaceTimeCubeMDRasterLayer SetEnv(object extent = null, object outputCoordinateSystem = null, object parallelProcessingFactor = null)
        {
            base.SetEnv(extent: extent, outputCoordinateSystem: outputCoordinateSystem, parallelProcessingFactor: parallelProcessingFactor);
            return this;
        }

    }

}